package com.realbrand.net.realbrandpay.ui.activity.wallet.set;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.LinearLayout;

import com.realbrand.net.realbrandpay.R;
import com.realbrand.net.realbrandpay.base.BaseActivity;
import com.realbrand.net.realbrandpay.ui.activity.login.ChangeLoginPasswdActivity;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/9/11.
 */

public class PasswordManageActivity extends BaseActivity {
    @BindView(R.id.passwdManegeActivity_toolbar)
    Toolbar passwdManegeActivityToolbar;
    @BindView(R.id.passwdManegeActivity_line_changeLoginPasswd)
    LinearLayout passwdManegeActivityLineChangeLoginPasswd;
    @BindView(R.id.passwdManegeActivity_line_changePayPasswd)
    LinearLayout passwdManegeActivityLineChangePayPasswd;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutId());
        ButterKnife.bind(this);
        passwdManegeActivityToolbar.setTitle("");
        passwdManegeActivityToolbar.setNavigationIcon(R.mipmap.ic_back);
        setSupportActionBar(passwdManegeActivityToolbar);
        passwdManegeActivityToolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(PasswordManageActivity.this, SettingActivity.class));
                finish();
            }
        });
        setOnClick();
    }

    @Override
    protected int getLayoutId() {
        return R.layout.passwdmanage_activity;
    }

    @Override
    protected void setOnClick() {
        passwdManegeActivityLineChangeLoginPasswd.setOnClickListener(this);
        passwdManegeActivityLineChangePayPasswd.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            //修改登录密码
            case R.id.passwdManegeActivity_line_changeLoginPasswd:
                startActivity(new Intent(this, ChangeLoginPasswdActivity.class));
                finish();
                break;
            //修改提现密码
            case R.id.passwdManegeActivity_line_changePayPasswd:
                startActivity(new Intent(this, ChangePayPasswdActivity.class));
                finish();
                break;
        }
    }
}
